import java.util.*;
import java.io.*;

//Date startDate;
class SitesByTime implements Comparable{
  Date date;
  int totalCountThisHour;
  HashMap sitesMapByHours;  //Hashmap of SiteCountHourly objects

  SitesByTime(){
    sitesMapByHours = new HashMap();  
  }  
  
  ArrayList getSitesByHour(){
    return new ArrayList( sitesMapByHours.values() ); 
    //ArrayList aList = new ArrayList(sitesMapByHours.values());
    //Collections.sort(aList); 
    //return aList;
  }
  
  public int compareTo( Object _o ){    
    SitesByTime sbt = (SitesByTime)_o;
    
//    StringTokenizer st = new StringTokenizer(month_year, "-");
//    String thisMonth = st.nextToken();
//    String thisYear = st.nextToken();
//    
//    Date thisDate = new Date(Integer.parseInt( thisYear ), Integer.parseInt( thisMonth ), 1 ); //year, month, day
//    
//    
//    st = new StringTokenizer( vcm.month_year, "-" );
//    String objectMonth = st.nextToken();
//    String objectYear = st.nextToken();
//    Date objectDate = new Date(Integer.parseInt( objectYear ), Integer.parseInt( objectMonth ), 1 ); //year, month, day
    
    Date thisDate = this.date;
    int compareResult = thisDate.compareTo(sbt.date);
    if( compareResult < 0 ){
      return -1;
    }

    if( compareResult > 0 ){
      return 1;
    }

    return 0;
  }
}


//
//class Date
//{
//  int YY;
//  int MM;
//  int DD;
//  int hh;
//
//  Date(String strDate)
//  {
//    String date[] = split(strDate,'-');
//    MM = Integer.parseInt(date[0]);
//    DD = Integer.parseInt(date[1]);
//    YY = Integer.parseInt(date[2]);
//    hh = Integer.parseInt(date[3]);
//  }
//  
//  int daysApart(Date d)
//  {
//    return (this.YY - d.YY)*365+(this.MM - d.MM)*30+(this.DD-d.DD);
//  }
//  String toString()
//  {
//    return ""+this.MM+"-"+this.DD;
//  }
//}
